package Queue;

public class Main {
    //MyQueue
    public static void main1(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.peek());
    }


    //MyCircularQueue
    public static void main(String[] args) {
        MyCircularQueue myCircularQueue = new MyCircularQueue(8);
        myCircularQueue.enQueue(2);
        myCircularQueue.enQueue(0);
        myCircularQueue.enQueue(0);
        myCircularQueue.enQueue(6);
        myCircularQueue.enQueue(0);
        myCircularQueue.enQueue(4);
        myCircularQueue.enQueue(0);
        myCircularQueue.enQueue(2);
        System.out.println(myCircularQueue.Front());

        System.out.println(myCircularQueue.Rear());
    }
}
